<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>
<style>
    .triangle {
        width: 0;
        height: 0;
        border-left: 50px solid transparent;
        border-bottom: 100px solid slateblue;
        border-right: 50px solid transparent;
        border-top: 0 solid transparent;
    }
</style>

<body>
    <div class="triangle"></div>
</body>
<!-- <script src="./LinkedList.js"></script> -->
<!-- <script src="./Algorithm.js"></script> -->
<!-- <script src="./sort.js"></script> -->
<script>
</script>
<button>按钮</button>
<script src="./1.js"></script>
<script>
    /*  Function.prototype.myApply = function(thisArg, args) {
                        thisArg = thisArg || window;
                        thisArg._fn = this;
                        args = args || [];
                        delete thisArg._fn;
                        return thisArg._fn(...args);
                    };
                    var name = "WINDOW";
                    let obj = {
                        name: "OBJ",
                    };

                    function f1(a, ...args) {
                        console.log(this.name, a, args);
                    }
                    //  f1.myApply(obj, [1, 2, 3]);

                    // Function.prototype.myCall = function(thisArg, ...args) {
                    //     thisArg = thisArg || window;
                    //     thisArg._fn = this;
                    //     thisArg._fn(...args);
                    // };
                    // f1.myCall(null, 1, 2); 
                    Function.prototype.myBind = function(thisArg, ...args1) {
                        thisArg = thisArg || window;
                        let self = this;
                        return function(...args2) {
                            console.log('this', this);
                            self.apply(thisArg, args1.concat(args2));
                        };
                    };
                    let f2 = f1.myBind(window, 1, 2, 3);
                    f2(4, 5, 6);
                    let f3 = new f2();
                    f3(); */
</script>

</html>